﻿using Furion.RemoteRequest;

namespace GoodAdmin.AuthExtra;

public interface IGetUser : IHttpDispatchProxy
{
    /// <summary>
    /// 获取用户详情
    /// </summary>
    /// <param name="accessToken"></param>
    /// <param name="userid"></param>
    /// <returns></returns>
    [Post("https://oapi.dingtalk.com/topapi/v2/user/get?access_token={accessToken}")]
    Task<HttpResponseMessage> GetUserDetailAsync(string accessToken, [Body] DingdingUserInput user);

    /// <summary>
    /// 获取用户详情
    /// </summary>
    /// <param name="accessToken"></param>
    /// <param name="userid"></param>
    /// <returns></returns>
    [Post("https://oapi.dingtalk.com/topapi/v2/user/list?access_token={accessToken}")]
    Task <HttpResponseMessage> GetUserDetailByDeptAsync(string accessToken, [Body] DingUserQueryByDeptInput input);

    [Post("https://oapi.dingtalk.com/topapi/v2/user/getuserinfo?access_token={accessToken}")]
    Task<HttpResponseMessage> GetUserIdAsync(string accessToken, [Body] DingUserAuthCode input);
}
